<template>
    <div id="my-admin-app">
        <router-view/>
    </div>
</template>
<script type="text/javascript">
import Cookies from 'js-cookie'
export default {
    components: {
    },
    data () {
        return {
        }
    },
    watch: {
        router (to, from) {
            console.log(to)
        }
    },
    mounted () {
        let loadingDom = document.getElementById('loading-model')
        if (loadingDom !== null) {
            document.body.removeChild(loadingDom)
        }
    },
    destroyed () {
        // 关闭页面清除token 本地数据
        Cookies.set('token', '')
        this.$local.del('menuList')
        this.$local.del('userName')
        this.$local.del('tagNavData')
        this.$local.del('OperationCode')
    }

}
</script>
<style scoped="" lang="less">
#@{css-prefix}-admin-app {
    width: 100%;
    height: 100%;
    background-color: @f8;
}
</style>
